package com.etc.demoarray;

import java.util.Arrays;
import java.util.Objects;
import java.util.Random;

/**
 * @author: knowno
 * @create: 2024-09-04 09:04
 * @Version 1.0
 **/
public class TestArray3 {
    public static void main(String[] args) {
        //这是一个一维数组
        Object [] rand = new Object[10];

        //在一维数组中嵌套一维数组
        rand[0] = new int[]{1,2,3};
        //打印输出数组元素
        System.out.println(Arrays.toString((int[]) rand[0])); //数组,1,2,3
        System.out.println(((int[])rand[0]).length); //3
        System.out.println(rand[1]); //一个独立对象null
        System.out.println(((int[])rand[1]).length);//?



    }
}
